home *** CD-ROM | disk | FTP | other *** search
- /*--------------------------------------------------------------------------*/
- /* */
- /* */
- /* ------------ Bit-Bucket Software <no-Inc> */
- /* \ 10001101 / Writers and Distributors of */
- /* \ 011110 / No-Cost<no-tm> Software. */
- /* \ 1011 / */
- /* ------ */
- /* */
- /* Copyright (C) 1987, 1988, 1989 by Robert Hartman and Vincent Perriello */
- /* */
- /* */
- /* Major definitions used in BinkleyTerm 2.10 */
- /* */
- /* */
- /* For complete details of the licensing restrictions, please refer */
- /* to the License agreement, which is published in its entirety in */
- /* the MAKEFILE and BT.C, and also contained in the file LICENSE.210. */
- /* */
- /* USE OF THIS FILE IS SUBJECT TO THE RESTRICTIONS CONTAINED IN THE */
- /* BINKLEYTERM LICENSING AGREEMENT. IF YOU DO NOT FIND THE TEXT OF */
- /* THIS AGREEMENT IN ANY OF THE AFOREMENTIONED FILES, OR IF YOU DO */
- /* NOT HAVE THESE FILES, YOU SHOULD IMMEDIATELY CONTACT THE AUTHORS */
- /* AT THE ADDRESSES LISTED BELOW. IN NO EVENT SHOULD YOU PROCEED TO */
- /* USE THIS FILE WITHOUT HAVING ACCEPTED THE TERMS OF THE */
- /* BINKLEYTERM LICENSING AGREEMENT, OR SUCH OTHER AGREEMENT AS YOU */
- /* ARE ABLE TO REACH WITH THE AUTHORS. */
- /* */
- /* */
- /* The Authors can be reached at the following addresses: */
- /* */
- /* Robert C. Hartman Vincent E. Perriello */
- /* Spark Software VEP Software */
- /* 427-3 Amherst Street 111 Carroll Street */
- /* CS2032, Suite 232 Naugatuck, CT 06770 */
- /* Nashua, NH 03061 */
- /* */
- /* FidoNet 1:132/101 FidoNet 1:141/491 */
- /* Data (603) 888-8179 Data (203) 729-7569 */
- /* */
- /* Please feel free to contact us at any time to share your comments */
- /* about our software and/or licensing policies. */
- /* */
- /*--------------------------------------------------------------------------*/
-
-
- /*--------------------------------------------------------------------------*/
- /* LEGIBLE SECTION. Definitions to make "C" look like a real language. */
- /*--------------------------------------------------------------------------*/
-
- #ifndef max
- #define max(a,b) ((a)>(b)?(a):(b))
- #endif
-
- #ifndef min
- #define min(a,b) ((a)<=(b)?(a):(b))
- #endif
-
- /*
- * updcrc macro derived from article Copyright (C) 1986 Stephen Satchell.
- * NOTE: First srgument must be in range 0 to 255.
- * Second argument is referenced twice.
- *
- * Programmers may incorporate any or all code into their programs,
- * giving proper credit within the source. Publication of the
- * source routines is permitted so long as proper credit is given
- * to Stephen Satchell, Satchell Evaluations and Chuck Forsberg,
- * Omen Technology.
- */
-
- #define updcrc(cp, crc) ( crctab[((crc >> 8) & 255) ^ cp] ^ (crc << 8))
-
- /* We need it the other way around for BinkleyTerm */
- #define xcrc(crc,cp) ( crctab[((crc >> 8) & 255) ^ cp] ^ (crc << 8))
-
- typedef unsigned bit;
- typedef unsigned int word;
- typedef unsigned char byte;
-
- #define fallthrough
-
-
- #define LOCAL static
- #define empty_str ""
-
- /*PLF Fri 05-05-1989 22:47:12
- * struct FILEINFO
- * {
- * see find.h char rsvd[21];
- * and find.c char attr;
- * long time;
- * long size;
- * char name[13];
- * char nill;
- * };
- */
-
- typedef struct pnums
- {
- char num[20];
- char pre[20];
- char suf[20];
- int len;
- struct pnums *next;
- } PN_TRNS;
-
-
- struct prototable
- {
- char first_char;
- int entry;
- };
-
- typedef struct mail {
- int zone;
- int net;
- int node;
- unsigned int mailtypes;
- struct mail *next;
- struct mail *prev;
- } MAIL, *MAILP;
-
- /* mailtypes bit field definitions */
- #define MAIL_CRASH 0x0001
- #define MAIL_HOLD 0x0002
- #define MAIL_DIRECT 0x0004
- #define MAIL_NORMAL 0x0008
- #define MAIL_REQUEST 0x0010
- #define MAIL_WILLGO 0x0020
- #define MAIL_TRIED 0x0040
- #define MAIL_TOOBAD 0x0080
- #define MAIL_UNKNOWN 0x0100
- #define MAIL_RES0200 0x0200
- #define MAIL_RES0400 0x0400
- #define MAIL_RES0800 0x0800
- #define MAIL_RES1000 0x1000
- #define MAIL_RES2000 0x2000
- #define MAIL_RES4000 0x4000
- #define MAIL_RES8000 0x8000
-
- typedef struct finfo
- {
- int info_size;
- char curr_fossil;
- char curr_rev;
- char far *id_string;
- int ibufr;
- int ifree;
- int obufr;
- int ofree;
- int swidth;
- int sheight;
- char baud;
- } FOSINFO;
-
- typedef int (*PFI3) (int, int, int, int);
-
- typedef struct {
- unsigned char background;
- unsigned char settings;
- unsigned char history;
- unsigned char hold;
- unsigned char call;
- unsigned char file;
- } COLORS, *COLORSP;
-
- /*--------------------------------------------------------------------------*/
- /* Sealink and Telink header structure */
- /*--------------------------------------------------------------------------*/
- #define HEADER_NAMESIZE 17
-
- struct zero_block
- {
- long size; /* file length */
- long time; /* file date/time stamp */
- char name[HEADER_NAMESIZE]; /* original file name */
- char moi[15]; /* sending program name */
- char noacks; /* for SLO */
- };
-
-
- /*--------------------------------------------------------------------------*/
- /* NodeList.Sys */
- /* */
- /* NET > 0 and NODE > 0 Normal node */
- /* */
- /* NET > 0 and NODE <= 0 Host node */
- /* Net host........node== 0 */
- /* Regional host...node==-1 */
- /* Country host....node==-2 */
- /* */
- /* NET == -1 Nodelist.Sys revision */
- /* */
- /* NET == -2 Nodelist statement */
- /* */
- /*--------------------------------------------------------------------------*/
-
-
- /*--------------------------------------------------------------------------*/
- /* NODE */
- /* Please note the NewStyle structure (below). Time is running out for the */
- /* existing `_node' structure! Opus currently uses the old style node */
- /* structure, but not for long. */
- /*--------------------------------------------------------------------------*/
- struct _node
- {
- int number; /* node number */
- int net; /* net number */
- int cost; /* cost of a message to this
- * node */
- int rate; /* baud rate */
- char name[20]; /* node name */
- char phone[40]; /* phone number */
- char city[40]; /* city and state */
- };
-
-
- /*--------------------------------------------------------------------------*/
- /* THE NEWSTYLE NODE LIST IS NOW BEING USED BY OPUS 1.10 */
- /*--------------------------------------------------------------------------*/
- struct _newnode
- {
- word NetNumber;
- word NodeNumber;
- word Cost; /* cost to user for a
- * message */
- byte SystemName[34]; /* node name */
- byte PhoneNumber[40]; /* phone number */
- byte MiscInfo[30]; /* city and state */
- byte Password[8]; /* WARNING: not necessarily
- * null-terminated */
- word RealCost; /* phone company's charge */
- word HubNode; /* node # of this node's hub
- * or 0 if none */
- byte BaudRate; /* baud rate divided by 300 */
- byte ModemType; /* RESERVED for modem type */
- word NodeFlags; /* set of flags (see below) */
- word NodeFiller;
- };
-
-
- /*------------------------------------------------------------------------*/
- /* Values for the `NodeFlags' field */
- /*------------------------------------------------------------------------*/
- #define B_hub 0x0001
- #define B_host 0x0002
- #define B_region 0x0004
- #define B_zone 0x0008
- #define B_CM 0x0010
- #define B_ores1 0x0020
- #define B_ores2 0x0040
- #define B_ores3 0x0080
- #define B_ores4 0x0100
- #define B_ores5 0x0200
- #define B_res1 0x0400
- #define B_res2 0x0800
- #define B_res3 0x1000
- #define B_res4 0x2000
- #define B_res5 0x4000
- #define B_res6 0x8000
-
-
-
- /*--------------------------------------------------------------------------*/
- /* Nodelist.Idx */
- /* (File is terminated by EOF) */
- /*--------------------------------------------------------------------------*/
-
- struct _ndi
- {
- int node; /* node number */
- int net; /* net number */
- };
-
-
- /*--------------------------------------------------------------------------*/
- /* QuickBBS 2.00 QNL_IDX.BBS */
- /* (File is terminated by EOF) */
- /*--------------------------------------------------------------------------*/
-
- struct QuickNodeIdxRecord
- {
- int QI_Zone;
- int QI_Net;
- int QI_Node;
- byte QI_NodeType;
- };
-
-
- /*--------------------------------------------------------------------------*/
- /* QuickBBS 2.00 QNL_DAT.BBS */
- /* (File is terminated by EOF) */
- /*--------------------------------------------------------------------------*/
-
- struct QuickNodeListRecord
- {
- byte QL_NodeType;
- int QL_Zone;
- int QL_Net;
- int QL_Node;
- byte QL_Name[21]; /* Pascal! 1 byte count, up
- * to 20 chars */
- byte QL_City[41]; /* 1 + 40 */
- byte QL_Phone[41]; /* 1 + 40 */
- byte QL_Password[9]; /* 1 + 8 */
- word QL_Flags; /* Same as flags in new
- * nodelist structure */
- int QL_BaudRate;
- int QL_Cost;
- };
-
-
- /* SEAdog NETLIST.DOG format */
- struct netls
- {
- int netnum;
- char netname[14];
- char netcity[40];
- int havehost;
- int nethost;
- int havegate;
- int netgate;
- long nodeptr;
- int numnodes;
- };
-
- /* SEAdog NODELIST.DOG format */
- struct nodels
- {
- int nodenum;
- char nodename[14];
- char nodecity[40];
- char nodephone[40];
- int havehub;
- int nodehub;
- int nodecost;
- int nodebaud;
- };
-
- /* Things most nodelists don't contain, but Binkley likes to have */
- struct extrastuff
- {
- char password[8];
- unsigned int flags1;
- char extra[6]; /* for future expansion */
- };
-
-
- /*--------------------------------------------------------------------------*/
- /* FIDONET ADDRESS STRUCTURE */
- /*--------------------------------------------------------------------------*/
- typedef struct _ADDRESS
- {
- word Zone;
- word Net;
- word Node;
- word Point;
- } ADDR;
-
-
- #define MAX_EXTERN 8
- #define ALIAS_CNT 15
-
- /*--------------------------------------------------------------------------*/
- /* Matrix mask */
- /* Undefined bits are reserved by Opus */
- /*--------------------------------------------------------------------------*/
- #define NO_TRAFFIC 0x0001
- #define LOCAL_ONLY 0x0002
- #define OPUS_ONLY 0x0004
-
- #define NO_EXITS 0x2000
- #define MAIL_ONLY 0x4000
- #define TAKE_REQ 0x8000
-
-
- /*--------------------------------------------------------------------------*/
- /* Message packet header */
- /*--------------------------------------------------------------------------*/
-
- #define PKTVER 2
-
- /*--------------------------------------------*/
- /* POSSIBLE VALUES FOR `product' (below) */
- /* */
- /* NOTE: These product codes are assigned by */
- /* the FidoNet<tm> Technical Stardards Com- */
- /* mittee. If you are writing a program that */
- /* builds packets, you will need a product */
- /* code. Please use ZERO until you get your */
- /* own. For more information on codes, write */
- /* to FTSC at 220/1. */
- /* */
- /*--------------------------------------------*/
- #define isFIDO 0
- #define isSPARK 1
- #define isSEA 2
- #define isDIRE 3
- #define isSlick 4
- #define isOPUS 5
- #define isHENK 6
- #define isTABBIE 8
- #define isWOLF 10
- #define isQMM 11
- #define isFD 12
- #define isTERUS 13
- #define isCYGNUS 16
- #define isGSPOINT 19
- #define isBGMAIL 20
- #define isCROSSBOW 21
- #define isDBRIDGE 26
- #define isDAISY 30
- #define isTHEBOX 32
-
-
- struct _pkthdr
- {
- int orig_node; /* originating node */
- int dest_node; /* destination node */
- int year; /* 0..99 when packet was created */
- int month; /* 0..11 when packet was created */
- int day; /* 1..31 when packet was created */
- int hour; /* 0..23 when packet was created */
- int minute; /* 0..59 when packet was created */
- int second; /* 0..59 when packet was created */
- int rate; /* destination's baud rate */
- int ver; /* packet version */
- int orig_net; /* originating network number */
- int dest_net; /* destination network number */
- char product; /* product type */
- char serial; /* serial number (some systems) */
-
- /* ------------------------------ */
- /* THE FOLLOWING SECTION IS NOT */
- /* THE SAME ACROSS SYSTEM LINES: */
- /* ------------------------------ */
-
- byte password[8]; /* session/pickup password */
- int orig_zone; /* originating zone */
- int dest_zone; /* Destination zone */
- byte B_fill2[16];
- long B_fill3;
- };
-
-
-
-
- /*--------------------------------------------------------------------------*/
- /* WaZOO */
- /*--------------------------------------------------------------------------*/
-
- #ifdef WAZOO_SECTION
-
- #ifndef ACK
- #define ACK 0x06
- #endif
-
- #ifndef NAK
- #define NAK 0x15
- #endif
-
- #ifndef ENQ
- #define ENQ 0x05
- #endif
-
- #ifndef YOOHOO
- #define YOOHOO 0x00f1
- #endif
-
- #ifndef TSYNC
- #define TSYNC 0x00ae
- #endif
-
- struct _Hello
- {
- word signal; /* always 'o' (0x6f) */
- word hello_version; /* currently 1 (0x01) */
- word product; /* product code */
- word product_maj; /* major revision of the
- * product */
- word product_min; /* minor revision of the
- * product */
- char my_name[60]; /* Other end's name */
- char sysop[20]; /* sysop's name */
- word my_zone; /* 0== not supported */
- word my_net; /* out primary net number */
- word my_node; /* our primary node number */
- word my_point; /* 0== not supported */
- byte my_password[8]; /* ONLY 6 CHARACTERS ARE
- * SIGNIFICANT !!!!! */
- byte reserved2[8]; /* reserved by Opus */
- word capabilities; /* see below */
- byte reserved3[12]; /* available to non-Opus
- * systems by prior */
- /* "approval" of 124/108. */
- }; /* size 128 bytes */
-
-
- /*--------------------------------------------------------------------------*/
- /* YOOHOO<tm> CAPABILITY VALUES */
- /*--------------------------------------------------------------------------*/
- #define Y_DIETIFNA 0x0001
- #define FTB_USER 0x0002
- #define Bit_2 0x0004
- #define ZED_ZAPPER 0x0008
- #define DOES_IANUS 0x0010
- #define Bit_5 0x0020
- #define Bit_6 0x0040
- #define Bit_7 0x0080
- #define Bit_8 0x0100
- #define Bit_9 0x0200
- #define Bit_a 0x0400
- #define Bit_b 0x0800
- #define Bit_c 0x1000
- #define Bit_d 0x2000
- #define Bit_e 0x4000
- #define WZ_FREQ 0x8000
-
- #endif
-
- /* END OF FILE: bink.h */